import { defineStore } from "pinia";
import { ref } from "vue";
import { useRouter } from "vue-router";
export const useRouterStore = defineStore("router", () => {
  // 存储路由菜单
  const { routes } = useRouter().options;
  const menuList = ref(routes);
  // const getMenuList = () => {
  //   menuList.value.forEach((item) => {
  //     if (item.children) {
  //       item.children.forEach((child) => {
  //         console.log(child);
  //       });
  //     }
  //   });
  // };
  return {
    menuList,
  };
});
